﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace WebApplication4.Controllers
{
    [Route("api/[controller]/{action=Get}")]
    [ApiController]
    public class ApiController : ControllerBase
    {
        [HttpGet]
        public JsonResult Get()
        {
            var student = new { name = "zhangsan", age = 20 };

            return new JsonResult(student);
        }
    }
}
